<!-- 编辑 -->
<script id="tpl-edit" type="text/template">
    <div class="am-padding-xs am-padding-top-sm">
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">关键字 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" name="data[keyword]" value="{{ model.keyword }}" required>
                <small>关键字设置为 * ，为无效关键字的回复</small>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">消息类型 </label>
            <div class="am-u-sm-9 am-u-end">
                <select class="type" name="data[type]" style="width:150px;" required>
                    <option value="">请选择消息类型</option>
                    <option value="text" {{ model.type.value == 'text' ? 'selected' : '' }}>文字消息</option>
                    <option value="image" {{ model.type.value == 'image' ? 'selected' : '' }}>图片消息</option>
                    <option value="voice" {{ model.type.value == 'voice' ? 'selected' : '' }}>语音消息</option>
					<option value="video" {{ model.type.value == 'video' ? 'selected' : '' }}>视频消息</option>
					<option value="news" {{ model.type.value == 'news' ? 'selected' : '' }}>图文消息</option>
                </select>
            </div>
        </div>
        <div class="key-content">
            <div class="am-form-group key-text">
                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">回复内容 </label>
                <div class="am-u-sm-9 am-u-end">
                    <textarea name="data[content][description]" rows="5" placeholder="请输入回复内容" required>{{ model.content.description }}</textarea>
					<small>换行显示用“回车”</small>
                </div>
            </div>
            <div class="am-form-group key-news">
                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">图文标题 </label>
                <div class="am-u-sm-9 am-u-end">
                    <input type="text" class="tpl-form-input" name="data[content][title]" value="{{ model.content.title }}" required>
                </div>
            </div>
            <div class="am-form-group key-news">
                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">图文描述 </label>
                <div class="am-u-sm-9 am-u-end">
                    <input type="text" class="tpl-form-input" name="data[content][description]" value="{{ model.content.description }}" required>
                </div>
            </div>
            <div class="am-form-group key-news">
                <label class="am-u-sm-3 am-u-lg-2 am-form-label">链接地址 </label>
                <div class="am-u-sm-9 am-u-end">
                    <input type="text" class="tpl-form-input" name="data[content][url]" value="{{ model.content.url }}">
                    <small>为空时：默认为站点网址</small>
                </div>
            </div>
            <div class="am-form-group key-media-id">
                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">MEDIA_ID </label>
                <div class="am-u-sm-9 am-u-end">
                    <input type="text" class="tpl-form-input" name="data[content][media_id]" value="{{ model.content.media_id }}" required>
                    <small class="key-image"><a href="{:url('wechat.material.image/index')}">点此上传图片素材，或获取 MEDIA_ID</a></small>
                    <small class="key-voice"><a href="{:url('wechat.material.voice/index')}">点此上传语音素材，或获取 MEDIA_ID</a></small>
                    <small class="key-video"><a href="{:url('wechat.material.video/index')}">点此上传视频素材，或获取 MEDIA_ID</a></small>
                    <small class="key-news"><a href="{:url('wechat.material.text/index')}">点此上传图文素材，或获取 MEDIA_ID</a></small>
                </div>
            </div>	
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">是否开启 </label>
            <div class="am-u-sm-9 am-u-end">
                <label class="am-radio-inline">
                    <input type="radio" name="data[is_open]" value="1" data-am-ucheck {{ model.is_open.value == 1 ? 'checked' : '' }}>
                    开启
                </label>
                <label class="am-radio-inline">
                    <input type="radio" name="data[is_open]" value="0" data-am-ucheck {{ model.is_open.value == 0 ? 'checked' : '' }}>
                    关闭
                </label>
            </div>
        </div>
    </div>  
</script>